package com.cya.forumproject.exception;

import com.cya.forumproject.common.AppResult;
import lombok.Data;

/**
 * @author ：陈奕安（3048279304@qq.com）
 * @date ：Created in 2025/9/19 19:58
 * @description：
 * @modified By：
 * @version:
 */
//自定义异常
@Data
public class ApplicationException extends RuntimeException{
    protected AppResult errorResult;


    public ApplicationException(AppResult errorResult){
        super(errorResult.getMessage());
        this.errorResult=errorResult;
    }

    public ApplicationException(String message) {
        super(message);
    }

    public ApplicationException(String message, Throwable cause) {
        super(message, cause);
    }

    public ApplicationException(Throwable cause) {
        super(cause);
    }
}